package com.sqm.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.List;
import java.util.Map;

/**
 * 功能: 小说模型
 * 作者: 沙琪马
 * 日期: 2024/6/7 12:10
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "novels")
public class Novel {
    @Id
    private String id;
    private String title;
    @Field(name = "novel_type")
    private String type; // 小说类型
    private String author;
    @Field(name = "update_time")
    private String updateTime;
    @Field(name = "jianjie")
    private String intro;
    @Field(name = "img_url")
    private String imgUrl;
    @Field(name = "zhangjie")
    private List<Map<String, String>> chapter;
}
